package com.whoimi.common.jdbc;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * jdbc 操作符封装
 *
 * @author whoimi
 * @since 2025-08-01
 **/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface SqlOperate {
    /**
     * 数据库字段名 默认为空串
     */
    String dbFieldName() default "";

    /**
     * 别名 默认为空串
     */
    String alias() default "";

    /**
     * 操作符 默认为 EQUAL
     */
    OperateEnum operate() default OperateEnum.EQUAL;


    enum OperateEnum {
        EQUAL, NOT_EQUAL, GREATER_THAN, GREATER_THAN_EQUAL, LESS_THAN, LESS_THAN_EQUAL, LIKE, LIKE_LEFT, LIKE_RIGHT, IN, NOT_IN, BETWEEN, IS_NOT_NULL,
        IS_NULL,ORDER_BY
    }


}